<?php echo $this->Html->script('combos') ?>
<?php echo $this->Html->css('order') ?>

<div class="drivers form">
  <?php echo $this->Form->create('Driver'); ?>

  <table>

    <tr>

      <td>

        <fieldset>
          <legend><?php echo __('Nuevo Chofer'); ?></legend>

          <?php echo $this->element('drivers/fieldsAll') ?>
        </fieldset>

      </td>
      <td>

        <fieldset>
          <legend><?php echo __('Camion'); ?></legend>

          <?php echo $this->element('vehicles/fieldsAll') ?>
        </fieldset>

        <br>
        <fieldset>
          <legend><?php echo __('Acoplado/Semi'); ?></legend>

          <?php echo $this->element('coupleds/fieldsAll') ?>
        </fieldset>

      </td>

    </tr>

  </table>

  <?php echo $this->Form->end(__('Guardar')); ?>
</div>
<div class="actions">
  <h3><?php echo __('Opciones'); ?></h3>
  <ul>
    <li><?php echo $this->Html->link(__('Choferes'), array('action' => 'index')); ?></li>
    <li><?php echo $this->Html->link(__('Empresas'), array('controller' => 'companies', 'action' => 'index')); ?> </li>
    <li><?php // echo $this->Html->link(__('Crear Orden de Ruta'), array('controller' => 'orders', 'action' => 'add'));         ?> </li>
  </ul>
</div>
<script>
  $(document).ready(function() {
        
    //        $("#DriverCompanyId").change(function() {
    //
    //            $("#DriverVehicleId").load('<? // echo $this->Html->url('../Vehicles/selectChange')      ?>',{idCompany:$("#DriverCompanyId").val()});
    //            $("#DriverCoupledId").load('<? // echo $this->Html->url('../Coupleds/selectChange')      ?>',{idCompany:$("#DriverCompanyId").val()});
    //            $("#DriverVehicleId").removeAttr('disabled');
    //            $("#DriverCoupledId").removeAttr('disabled');
    //
    //
    //        });
            
  })
</script>